<!DOCTYPE html>
<html>
<head>
    <title>测试结果汇总</title>
    <style>
        .fail {
            color: red;
			width: 7emem;
			text-align: center;
        }
        .success {
            color: green;
			width: 7emem;
			text-align: center;
        }
		.details-col-elapsed {
			width: 7em;
			text-align: center;
		}
		.details-col-msg {
			width: 10em;
			text-align: center;
			background-color:#66ffcc;
		}

    </style>
</head>
<body>
<div>
    <br>
    <br>
    <table border="thin" cellspacing="0" cellpadding="5" width="95%" align="center">
        <tr colspan="4" bgcolor="#ffe4c4" style="font-size: 30px">
            <td colspan="5" align="center">自动化测试报告:</td>
        </tr>
        <tr align="center" style="font-size: 20px">
            <td width="15%">执行总数：{{result.execute_sum}}</td>
            <td width="15%">成功个数:{{result.success_num}}</td>
            <td width="15%">失败个数:{{result.fail_sum}}</td>
            <td width="20%">执行成功率:{{result.percent}}</td>
            <td width="35%">最后时间:{{result.time_stmp}}</td>
        </tr>
    </table>

    <br>
    <table  border="thin" cellspacing="0" cellpadding="3"  width="95%" style="margin: auto;">
        <tr  style="font-size: 20px">
            <th class='details-col-msg' >编号</th>
            <th class='details-col-msg' >case编号</th>
            <th class='details-col-msg' >case描述</th>
            <th class='details-col-msg' >所属模块</th>
            <th class='details-col-msg' >执行结果</th>
            <th class='details-col-msg' >执行时间</th>
            <th class='details-col-msg' >报错信息</th>
            <th class='details-col-msg' >文件路径</th>
        </tr>
        {% for r in result.case_detail_list %}
        <tr style="font-size: 16px">
            <td class='details-col-elapsed' >{{ loop.index }}</td>
            <td class='details-col-elapsed'>{{ r.caseid }}</td>
            <td class='details-col-elapsed'>{{ r.desc }}</td>
            <td class='details-col-elapsed'>{{ r.module }}</td>
            <td class="{{'success' if r.res=='成功' else 'fail' }}">{{ '成功' if r.res=='成功' else '失败' }} </td>
            <td class='details-col-elapsed'>{{ r.run_time }}</td>
            <td class='details-col-elapsed'>{{ r.res_info }}</td>
            <td class='details-col-elapsed'>{{ r.file_path }}</td>
        </tr>
        {% endfor %}

    </table>
</div>
</body>
</html>